import request from '@/utils/request'
//查询所有
export function listTable(query) {
  return request({
    url: '/table/selAll',
    method: 'get',
    params: query
  })
}
//id查询
export function getTable(id) {
  return request({
    url: '/table/id/'+id,
    method: 'get',
  })
}
// 新增
export function addTable(data) {
  return request({
    url: '/table/addLocation',
    method: 'post',
    params: data
  })
}
//update
export function updateTable(data) {
  return request({
    url: '/table/updateTable',
    method: 'post',
    params: data
  })
}
export function updateToOne(id) {
  return request({
    url: '/table/updateToOne?id='+id,
    method: 'post',
  })
}
export function updateToTwo(id) {
  return request({
    url: '/table/updateToTwo?id='+id,
    method: 'post',
  })
}
export function updateToThree(id) {
  return request({
    url: '/table/updateToThree',
    method: 'post',
    params: id
  })
}


//del
export function delTable(id) {
  return request({
    url: '/table/del?id='+id,
    method: 'delete',

  })
}


//模糊查询
export function likeTable(location) {
  return request({
    url: '/table/like?location=' + location,
    method: 'get',

  })
}


